import Vue from 'vue'

import VueI18n from 'vue-i18n'
import Cookie from 'js-cookie'

import en from './lib/en'
import zh from './lib/zh'

Vue.use(VueI18n)

const i18n = new VueI18n({
  locale: Cookie.get('language'),
  messages: {
    zh: { ...zh },
    en: { ...en }
  }

})

export default i18n
